module Admin
  class StocksController < ApplicationController
    # GET /stocks
    # GET /stocks.xml
    def index
      @stocks = Stock.paginate :page => params[:page], :per_page => 20, :order=>'stock_no'

      respond_to do |format|
        format.html # index.html.erb
        format.xml  { render :xml => @stocks }
      end
    end


    # GET /stocks/1
    # GET /stocks/1.xml
    def show
      @stock = Stock.find(params[:id])

      respond_to do |format|
        format.html # show.html.erb
        format.xml  { render :xml => @stock }
      end
    end
  end
end
